﻿/*
 *    Copyright [2010] [Daniel Sawan]
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */

package com.kikoulol.jarmory.extractor.xml;

import java.util.ArrayList;
import java.util.List;

import com.kikoulol.jarmory.extractor.enums.Regions;

/**
 * 
 * Property whose getter do not fire super.setupXml() method : itemId
 * 
 */
public class ItemTooltip extends AbstractArmoryXmlFile
{
  private String itemId;
  private List<CharacterSheet> characters = new ArrayList<CharacterSheet>();

  private String armor;
  private String bonding;
  private String bonusDefenseSkillRating;
  private String bonusDodgeRating;
  private String bonusHitRating;
  private String bonusStamina;
  private String bonusStrength;
  private String classId;
  private String damageData;
  private String durability;
  private String equipData;
  private String heroic;
  private String icon;
  private String itemLevel;
  private String itemSource;
  private String name;
  private String overallQualityId;
  private String requiredLevel;
  private String socketData;

  /**
   * 
   * @param region
   * @param itemId
   */
  public ItemTooltip(Regions region, String itemId)
  {
    super(region, "item-tooltip.xml?i=" + itemId);
    this.itemId = itemId;
  }

  /**
   * 
   */
  protected void initProperties()
  {
    this.armor =            this.getItemElementNodeValue(this.getXml(), "armor");
    this.bonding =          this.getItemElementNodeValue(this.getXml(), "bonding");
    this.bonusDefenseSkillRating = this.getItemElementNodeValue(this.getXml(), "bonusDefenseSkillRating");
    this.bonusDodgeRating = this.getItemElementNodeValue(this.getXml(), "bonusDodgeRating");
    this.bonusHitRating =   this.getItemElementNodeValue(this.getXml(), "bonusHitRating");
    this.bonusStamina =     this.getItemElementNodeValue(this.getXml(), "bonusStamina");
    this.bonusStrength =    this.getItemElementNodeValue(this.getXml(), "bonusStrength");
    this.classId =          this.getItemElementNodeValue(this.getXml(), "classId");
    this.damageData =       this.getItemElementNodeValue(this.getXml(), "damageData");
    this.durability =       this.getItemElementNodeValue(this.getXml(), "durability");
    this.equipData =        this.getItemElementNodeValue(this.getXml(), "inventoryType");
    this.heroic =           this.getItemElementNodeValue(this.getXml(), "heroic");
    this.icon =             this.getItemElementNodeValue(this.getXml(), "icon");
    this.itemLevel =        this.getItemElementNodeValue(this.getXml(), "itemLevel");
    this.itemSource =       this.getItemElementNodeValue(this.getXml(), "itemSource");
    this.name =             this.getItemElementNodeValue(this.getXml(), "name");
    this.overallQualityId = this.getItemElementNodeValue(this.getXml(), "overallQualityId");
    this.requiredLevel =    this.getItemElementNodeValue(this.getXml(), "requiredLevel");
    this.socketData =       this.getItemElementNodeValue(this.getXml(), "socketData");
  }

  public String getArmor()
  {
    super.setupXml();
    return armor;
  }

  public String getBonding()
  {
    super.setupXml();
    return bonding;
  }

  public String getBonusDefenseSkillRating()
  {
    super.setupXml();
    return bonusDefenseSkillRating;
  }

  public String getBonusDodgeRating()
  {
    super.setupXml();
    return bonusDodgeRating;
  }

  public String getBonusHitRating()
  {
    super.setupXml();
    return bonusHitRating;
  }

  public String getBonusStamina()
  {
    super.setupXml();
    return bonusStamina;
  }

  public String getBonusStrength()
  {
    super.setupXml();
    return bonusStrength;
  }

  public List<CharacterSheet> getCharacters()
  {
    super.setupXml();
    return characters;
  }

  public String getClassId()
  {
    super.setupXml();
    return classId;
  }

  public String getDamageData()
  {
    super.setupXml();
    return damageData;
  }

  public String getDurability()
  {
    super.setupXml();
    return durability;
  }

  public String getEquipData()
  {
    super.setupXml();
    return equipData;
  }

  public String getHeroic()
  {
    super.setupXml();
    return heroic;
  }

  public String getIcon()
  {
    super.setupXml();
    return icon;
  }

  /**
   * Do not fire super.setupXml() method
   * 
   * @return
   */
  public String getItemId()
  {
    return itemId;
  }

  public String getItemLevel()
  {
    super.setupXml();
    return itemLevel;
  }

  public String getItemSource()
  {
    super.setupXml();
    return itemSource;
  }

  public String getName()
  {
    super.setupXml();
    return name;
  }

  public String getOverallQualityId()
  {
    super.setupXml();
    return overallQualityId;
  }

  public String getRequiredLevel()
  {
    super.setupXml();
    return requiredLevel;
  }

  public String getSocketData()
  {
    super.setupXml();
    return socketData;
  }
}